﻿Public Class Form1
    Dim cl As System.Net.Sockets.TcpClient
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        cl = New System.Net.Sockets.TcpClient()

        cl.Connect("127.0.0.1", 8888)

    End Sub


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        cl.Close()

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim s = System.Text.Encoding.ASCII.GetBytes(TextBox1.Text.Trim)
        cl.Client.Send(s)
    End Sub
End Class
